﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectAnnouncement
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ywxt.ProjectAnnouncement;

    class ProjectAnnouncementType_Map : ClassMapping<AnnouncementType>
    {
        public ProjectAnnouncementType_Map()
        {
            //映射ID
            Id(x => x.ID, map =>
            {
                map.Length(40);
                map.Column("type_id");
            });

            Property(x => x.IsValid, map =>
            {
                map.Column("is_valid");
            });

            Property(x => x.CreateDate, map =>
            {
                map.Column("create_date");
            });

            Property(x => x.TypeCode, map =>
            {
                map.Length(50);
                map.Column("type_code");
            });
            
            Property(x => x.TypeName, map =>
            {
                map.Length(200);
                map.Column("type_name");
            });

            Table("nr_type");

            //不进行创建
            SchemaAction(NHibernate.Mapping.ByCode.SchemaAction.None);
        }
    }
}
